import request from '@/utils/request'
// 查询章节列表
export function listPost_chapter(query) {
    return request({
      url: '/manager/course/chapter/list',
      method: 'get',
      params: query
    })
  }
  // 章节排序
  export function sort_chapter(data) {
    return request({
      url: "/manager/course/chapter/sort",
      method: "post",
      data: data,
    });
  }
  // 查询章节详细
  export function getPost_chapter(postId) {
    return request({
      url: '/manager/course/chapter/' + postId,
      method: 'get'
    })
  }
  
  // 新增章节
  export function addPost_chapter(data) {
    return request({
      url: '/manager/course/chapter',
      method: 'post',
      data: data
    })
  }
  
  // 修改章节
  export function updatePost_chapter(data) {
    return request({
      url: '/manager/course/chapter',
      method: 'put',
      data: data
    })
  }
  
  // 删除章节
  export function delPost_chapter(postId) {
    return request({
      url: '/manager/course/chapter/' + postId,
      method: 'delete'
    })
  }



  // 查询章节类型列表
export function listPost_chapterType(query) {
    return request({
      url: '/manager/course/chapterType/list',
      method: 'get',
      params: query
    })
  }
  
  // 查询章节类型详细
  export function getPost_chapterType(postId) {
    return request({
      url: '/manager/course/chapterType/' + postId,
      method: 'post'
    })
  }
  
  // 新增章节类型
  export function addPost_chapterType(data) {
    return request({
      url: '/manager/course/chapterType',
      method: 'post',
      data: data
    })
  }
  
  // 修改章节类型
  export function updatePost_chapterType(data) {
    return request({
      url: '/manager/course/chapterType',
      method: 'put',
      data: data
    })
  }
  
  // 删除章节类型
  export function delPost_chapterType(postId) {
    return request({
      url: '/manager/course/chapterType/' + postId,
      method: 'delete'
    })
  }